class Animal:
    def shout(self):
        print("动物叫一声")

class Dog:
    def shout(self):
        print("小狗汪汪")

class Cat:
    def shout(self):
        print("小猫喵喵")

def Animalshout(a):
    a.shout()       #传入对象不同，shout方法实际行为不同

Animalshout(Dog())
Animalshout(Cat())